import Vue from "vue";
import VueRouter from "vue-router";


// import LoginResgiter from "../views/LoginResgiter.vue"
// import Home from "../views/Home.vue";

const LoginResgiter = () => import(/* webpackChunkName:"loginResgiter_home" */ '../views/LoginResgiter.vue')
const Home = () => import(/* webpackChunkName:"loginResgiter_home" */ '../views/Home.vue')

// import Chart from "../views/Chart/Chart.vue";
// import Product from "../views/Product/Product.vue";
// import News from "../views/News/News.vue"
// import Sort from "../views/Sort/Sort.vue"
// import Serve from "../views/Serve/Serve.vue";
// import Message from "../views/Message/Message.vue";
// import Customere from "../views/Customere/Customere.vue";
// import AboutUs from "../views/AboutUs/AboutUs.vue";
// import Operation from "../views/Operation/Operation.vue";

const Chart = () => import(/* webpackChunkName:"chart" */ '../views/Chart/Chart.vue')
const  Product = () => import(/* webpackChunkName:"product" */ '../views/Product/Product.vue')
const  News = () => import(/* webpackChunkName:"product" */ '../views/News/News.vue')
const  Sort = () => import(/* webpackChunkName:"product" */ '../views/Sort/Sort.vue')
const  Serve = () => import(/* webpackChunkName:"product" */ '../views/Serve/Serve.vue')
const  Message = () => import(/* webpackChunkName:"product" */ '../views/Message/Message.vue')
const  Customere  = () => import(/* webpackChunkName:"product" */ '../views/Customere/Customere.vue')
const  AboutUs = () => import(/* webpackChunkName:"product" */ '../views/AboutUs/AboutUs.vue')
const  Operation = () => import(/* webpackChunkName:"product" */ '../views/Operation/Operation.vue')

Vue.use(VueRouter);

const routes = [
  {path:"/",redirect:"/login_register"},
  {path:"/login_register",component:LoginResgiter},
  {path: '/home',
  component: Home,
  redirect:"/chart",
  children:[
    {path:'/chart',component:Chart},
    {path:'/product',component:Product},
    {path:'/serve',component:Serve},
    {path:'/news',component:News},
    {path:"/sort",component:Sort},
    {path:'/message',component:Message},
    {path:'/customere',component:Customere},
    {path:'/about_us',component:AboutUs},
    {path:'/primary_operation',component:Operation},
  ]
  },
];

const router = new VueRouter({
  // mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
